<?php
class WshopModel extends Model
{
	static public function getInstance()
	{
		static $_obj = null;
		if($_obj == null){
			$_obj = M('Weishop');
		}
		return $_obj;
	}

	static public function getShopDetail($options)
	{
		return self::getInstance()->where($options)->find();
	}

	static public function getShopListAll($order = array())
	{
		return self::getInstance()->order($order)->select();
	}

	static public function getShopList($page, $page_size, $options=array(), $order = array())
	{
		return self::getInstance()->where($options)->limit($page, $page_size)->order($order)->select();
	}

	static public function getShopCount($options = array())
	{
		return self::getInstance()->where($options)->count();
	}

	static public function updateShop($options, $data)
	{
		return self::getInstance()->where($options)->save($data);
	}
}